import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // 用户信息
    userInfo: '',
    // 账号状态
    userAccount: '',
    // 歌曲id
    songId: 1
  },
  mutations: {
    SETUSERINFO (state, newUserInfo) {
      state.userInfo = newUserInfo
    },
    SETACCOUNT (state, userAccount) {
      state.userAccount = userAccount
    },
    SETSONGID (state, id) {
      state.songId = id
    }
  },
  actions: {},
  modules: {}
})
